home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / DevInfo / Intuition / Hints next >
Text File  |  1996-07-13  |  2KB  |  37 lines

  1.  
  2.     $Id: Hints 1.2 1996/07/13 21:03:09 heinz Exp $
  3.  
  4. - Intuition deadlocks are usually caused by Layer lock
  5.   misunderstandings. Read the autodoc for LockLayer() very
  6.   carefully. Many Intuition functions also use Layer locking, e.g.
  7.   ObtainGIRPort(). Don't wait for Intuition or try any synchronous
  8.   Intuition interaction directly or indirectly while Layers are
  9.   locked.
  10.  
  11. - It is strongly discouraged to use so called "atomic
  12.   modifications" of structure fields like updating the
  13.   ReportMouse() setting WFLG_REPORTMOUSE or changing WFLG_RMBTRAP
  14.   on the fly. On future PowerPC machines, a single instruction
  15.   might no longer be atomic. So if there is a function to modify a
  16.   shared value, use it.
  17.  
  18. - There are some things in Intuition without proper Semaphore
  19.   protection. Just check the CloseWindow() autodoc for the
  20.   description of CloseWindowSafely(). Expect Forbid() type locking
  21.   to be replaced with proper semaphore locking in a PowerPC OS.
  22.   Isolate those places in the code that you want to use on a
  23.   PowerPC OS to make changes easier.
  24.  
  25. - Don't play stunts with the borders. Adding gadgets to any border
  26.   has always been fairly tricky because the window metric couldn't
  27.   be fully obtained without hacking into things. Expect this to
  28.   change and expect a need for calling a function to obtain
  29.   information about sizes in a future OS. The GUI will change.
  30.  
  31. - Expect GUI changes. If at all possible, don't use assumptions and
  32.   hardcoded sizes for UI elements.
  33.  
  34. Heinz Wrobel
  35. <heinz@amiga.de>
  36.  
  37.